package BanyuanClub.Study.Day0309.锁相关2;

public class Dog extends Thread{
    private GuanTou guanTou;
    public Dog (GuanTou guanTou){
        this.guanTou = guanTou;
    }
    @Override
    public void run() {
        guanTou.eated();
    }

    public static void main(String[] args) {
        GuanTou guantou = new GuanTou();
        Dog d1 = new Dog(guantou);
        Dog d2 = new Dog(guantou);
        d1.start();
        d2.start();
    }
}
